<?php

try
{
	$dbh = new PDO('mysql:host=localhost;dbname=setsuna', 'setsuna', 'setsuna');
	//foreach($dbh->query('SELECT * from mst_tree') as $row) 
	//{
	//	print_r($row);
	//}
	//$dbh = null;

	//$rows = $dbh->query( 'SELECT * from mst_tree' );
    $sql = 'SELECT * from mst_tree';
    foreach ($dbh->query($sql) as $row) {
        print $row['name'] . "\t";
        print $row['level'] . "\t";
        print $row['experience'] . "\n";
        print $row['koudouryoku'] . "\n";
    }
}

catch (PDOException $e)
{
	print "Error!: " . $e->getMessage() . "<br/>";
	die();
}

?>
